﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CRM
{
    public partial class AJAX : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GetClass();
            }
        }
        /// <summary>
        /// 根据类型返回相应信息
        /// </summary>
        private void GetClass()
        {
            string strClass = Common.GetMes.GetRequestQuery(Request, "AjaxClass");
            switch (strClass)
            {
                case "CheckName":
                    CheckName();
                    break;
                case "":
                    break;
                default:
                    break;
            }
        }
        /// <summary>
        /// 判断用户名是否存在
        /// </summary>
        private void CheckName()
        {
            string strCheckName = Common.GetMes.GetRequestQuery(Request, "Name");
            Response.Write(BLL.ServiceUser.CheckServiceName(strCheckName));}
        }
    }
